﻿Public Class CTipoValorLI

    Private _idEmisora   As TipoEmisora  
    Private _descEmisora As String 
    Private _tipoValor   As String 
    Private _esEditableNuevo As Boolean 


    Public  Property EsEditableNuevo() As Boolean 
        Get
            Return _esEditableNuevo
        End Get    
        Set(ByVal value As Boolean )
                _esEditableNuevo = value
        End Set
    End Property

   Public Enum TipoEmisora 
        ninguno = 0
        Gubernamental = 1 
        Bancario = 2
        Corporativo = 3
   End Enum


   Public Sub new()

   Me.IdEmisora =  TipoEmisora.ninguno 
   Me.TipoValor =  ""
   Me.EsEditableNuevo = False 
End Sub


Public Sub new(ByVal emisora As TipoEmisora, ByVal nombreValor As String)

   Me.IdEmisora = emisora 
   Me.TipoValor = nombreValor 
   Me.EsEditableNuevo = False 
End Sub


Public Sub new(ByVal emisora As TipoEmisora, ByVal nombreValor As String, ByVal esEditable As Boolean )

   Me.IdEmisora = emisora 
   Me.TipoValor = nombreValor 
   Me.EsEditableNuevo = esEditable 
End Sub





Public Property IdEmisora() As TipoEmisora 
    Get
        Return _idEmisora
    End Get
    Set(ByVal value As TipoEmisora )
        _idEmisora = value
        Select Case value 
           Case TipoEmisora.Gubernamental  
                _descEmisora = "Gubernamental"
           Case TipoEmisora.Bancario 
                _descEmisora = "Bancario"          
           Case TipoEmisora.Corporativo 
                _descEmisora = "Corporativo"
        End Select
    End Set
End Property




Public Property DescEmisora() As String
    Get
        Return _descEmisora 
    End Get
    Set(ByVal value As String)
        _descEmisora = value
    End Set
End Property



Public Property TipoValor() As String
    Get
        Return _tipoValor
    End Get
    Set(ByVal value As String)
        _tipoValor = value
    End Set
End Property


    Public Overrides Function ToString() As String
        Return _descEmisora
    End Function


End Class
